package com.kaishengit.pojo;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
@Entity
@Table(name="t_event")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class Event {
	



	private int id; 
	private String des;

	private String createtime;
	private String state;
	
	private Employee employee;
	private EventItem eventitem;
	private Set<EventDiscuss> sventDiscussSet;
	private Product product;
	
	

	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}

	public String getDes() {
		return des;
	}
	
		public void setDes(String des) {
		this.des = des;
		
		}
	public String getCreatetime() {
		return createtime;
	}
	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	@ManyToOne
	@JoinColumn(name="employeeid")
	public Employee getEmployee() {
		return employee;
	}
	public void setEmployee(Employee employee) {
		this.employee = employee;
	}
	@ManyToOne
	@JoinColumn(name="eventitemid")
	public EventItem getEventitem() {
		return eventitem;
	}
	public void setEventitem(EventItem eventitem) {
		this.eventitem = eventitem;
	}
	@OneToMany(mappedBy="event")
	public Set<EventDiscuss> getSventDiscussSet() {
		return sventDiscussSet;
	}
	public void setSventDiscussSet(Set<EventDiscuss> sventDiscussSet) {
		this.sventDiscussSet = sventDiscussSet;
	}
	@ManyToOne
	@JoinColumn(name="productid")
	public Product getProduct() {
		return product;
	}
	public void setProduct(Product product) {
		this.product = product;
	}
	
	
}
